package subject_set.lanqiao;

import java.util.Scanner;

/**
 * @author haomin
 * @date 2022/10/24 15:52
 **/
public class Num2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 0, you = 0, ji = 0;
        count = Integer.parseInt(scan.nextLine());
        while(scan.hasNextLine()){
            int score = Integer.parseInt(scan.nextLine());
            if(score >= 85) you++;
            if(score >= 60) ji++;
        }
        ji = (ji * 1000 / count + 5)/10;
        you = (you * 1000 / count + 5)/10;
        System.out.println(ji + "%");
        System.out.println(you + "%");
        scan.close();
    }
}